package com.sxj.PDMS.mapper;

import com.sxj.PDMS.model.entity.PartyMemberPunishments;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;

/**
* @author 503c'j
* @description 针对表【party_member_punishments(党员惩罚表)】的数据库操作Mapper
* @createDate 2024-06-16 17:28:12
* @Entity com.sxj.PDMS.model.entity.PartyMemberPunishments
*/
public interface PartyMemberPunishmentsMapper extends BaseMapper<PartyMemberPunishments> {
    /**
     * 查询所有数据,分页展示
     *
     * @param start
     * @param pageSize
     * @return
     */
    @Select("select * from party_member_punishments limit #{start},#{pageSize}")
    List<PartyMemberPunishments> selectAll(@Param("start") Integer start,
                                           @Param("pageSize") Integer pageSize);
    @Select("select count(*) from party_member_punishments")
    Long selectTotal();

    Long selectTotalByContentOrMemberNumberOrDate(@Param("punishmentContent") String punishmentContent,
                                                  @Param("partyMemberNumber") Long partyMemberNumber,
                                                  @Param("punishmentDate") Date punishmentDate);

    List<PartyMemberPunishments> selectByContentOrMemberNumberOrDate(@Param("start") Integer start,
                                                                     @Param("pageSize") Integer pageSize,
                                                                     @Param("punishmentContent") String punishmentContent,
                                                                     @Param("partyMemberNumber") Long partyMemberNumber,
                                                                     @Param("punishmentDate") Date punishmentDate);
}




